<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
	<title>用户管理</title>
</head>
<body>
<jsp:include page="../frame.jsp" />
<div class="main-content">
	<div class="main-content-inner">
		<div class="breadcrumbs ace-save-state" id="breadcrumbs">
			<ul class="breadcrumb">
				<li>
					<i class="ace-icon fa fa-home home-icon"></i>
					<a href="${pageContext.request.contextPath}/statistics">首页</a>
				</li>
				<li class="active">用户管理</li>
			</ul><!-- /.breadcrumb -->

			<div class="nav-search" id="nav-search">
				<form class="form-search" action="#">
                    <span class="input-icon">
                        <input type="text" placeholder="搜索" class="nav-search-input" id="nav-search-input" autocomplete="off" />
                        <i class="ace-icon fa fa-search nav-search-icon"></i>
                    </span>
				</form>
			</div><!-- /.nav-search -->
		</div>

		<div class="page-content">
			<div class="page-header">
				<h1>
					用户管理
					<small>
						<i class="ace-icon fa fa-angle-double-right"></i>
						<c:if test="${not empty user}">
							修改用户信息
						</c:if>
						<c:if test="${empty user}">
							新增用户信息
						</c:if>
					</small>
				</h1>
			</div><!-- /.page-header -->

			<div class="row">
				<div class="col-xs-12">
					<!-- PAGE CONTENT BEGINS -->
					<form class="form-horizontal" role="form" action="${pageContext.request.contextPath}/userManage" method="post">
						<input type="hidden" name="method" value="updateUser"/>
						<input type="hidden" name="uid" value="${user.uid}"/>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right"> 昵称 </label>

							<div class="col-sm-9">
                                <span class="block col-xs-10 col-sm-5  no-padding input-icon input-icon-right">
                                    <input placeholder="请输入用户名（昵称）" class="width-100" type="text" name="username" value="${user.username}" required>
                                </span>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">性别</label>
							<div class="col-sm-9">
								<div class="radio">
									<label>
										<input name="sex" <c:if test="${user.sex == '男'}">checked</c:if> class="ace" type="radio" value="男">
										<span class="lbl">男</span>
									</label>

									<label>
										<input name="sex" <c:if test="${user.sex == '女'}">checked</c:if> class="ace" type="radio" value="女">
										<span class="lbl">女</span>
									</label>
								</div>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right"> 手机 </label>

							<div class="col-sm-9">
                                <span class="block col-xs-10 col-sm-5  no-padding input-icon input-icon-right">
                                    <input name="tel" placeholder="请输入用户手机号码" class="width-100" type="text" value="${user.telephone}" readonly required>
                                </span>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right"> 密码 </label>

							<div class="col-sm-9">
                                <span class="block col-xs-10 col-sm-5  no-padding input-icon input-icon-right">
                                    <input name="password" placeholder="默认是123456" class="width-100" type="text" value="${user.password}" required>
                                </span>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right"> 邮箱 </label>

							<div class="col-sm-9">
                                <span class="block col-xs-10 col-sm-5  no-padding input-icon input-icon-right">
                                    <input name="from" placeholder="请输入邮箱" class="width-100" type="email" value="${user.email}" pattern="^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$" required>
                                </span>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right"> 生日 </label>

							<div class="col-sm-9">
                                <span class="block col-xs-10 col-sm-5  no-padding input-icon input-icon-right">
                                    <input name="birthday" class="width-100" type="date" value="${user.birthday}" required>
                                </span>
							</div>
						</div>

						<div class="clearfix form-actions">
							<div class="col-md-offset-3 col-md-9">
								<button class="btn btn-info" type="submit">
									<i class="ace-icon fa fa-check bigger-110"></i>
									提交
								</button>

								&nbsp; &nbsp; &nbsp;
								<button class="btn" type="reset">
									<i class="ace-icon fa fa-undo bigger-110"></i>
									重置
								</button>
							</div>
						</div>
					</form>
					<!-- PAGE CONTENT ENDS -->
				</div><!-- /.col -->
			</div>
		</div>
	</div>
</div>
</body>
</html>